package com.xbongbong.pay.platform.alipay.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;

/**
 * 支付宝配置
 * @author 魏荣杰
 * @date 2021/1/15 16:32
 * @since
 * @version
 */
@Data
@ConfigurationProperties("ali.pay")
public class AliPayConfig {
    Map<String, Config> config = new HashMap<>();

    @Data
    public static class Config {
        /**
         * sign type default RSA2
         */
        private String signType = "RSA2";
        /**
         * data format   only json now
         */
        private String format = "json";
        /**
         * charset  default utf-8
         */
        private String charset = "utf-8";
        /**
         * 支付宝支付api服务请求地址
         */
        private String serverUrl = "https://openapi.alipay.com/gateway.do";
        /**
         * 应用id
         */
        private String appId;
        /**
         * 应用私钥
         */
        private String appPrivateKeyPath;
        /**
         * 应用公钥证书
         */
        private String appCertPublicKeyPath;
        /**
         * 支付宝公钥证书
         */
        private String alipayPublicCertPath;
        /**
         * 支付宝根证书
         */
        private String alipayRootCertPath;

    }
}
